<?php
if (isset($_SESSION['openid'])){
    include '../c/config.php';
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqliTwo->error);}
    $openid=$_SESSION['openid'];
    $riqi=date("nj");
    $query=$mysqli->query("select id from chou where openid='".$openid."' and riqi='".$riqi."' limit 0,1 ");
    if($query->num_rows>0){
    	echo json_encode(array('s'=>'yes'));
    	exit;
    }
    echo json_encode(array('s'=>'not'));
}else{
    echo json_encode(array('s'=>'yes'));
}
